package com.yfeng.goodjuhome.service;

import com.yfeng.exception.ServiceException;
import com.yfeng.goodjuhome.model.User;


public interface IUserService {

    /**
     * 取一个USER对象
     * @param id 用户id
     * @return  User model
     * @throws ServiceException
     */
    public User getUser(String id) throws ServiceException;
    public User getUserByName(String username) throws ServiceException;

	public int toLogin(String username,String passwd,String usertype) throws ServiceException;
	
	public boolean toLogin(String username, String passwd) throws ServiceException;

    public boolean isExist(String uid) throws ServiceException;

	/*
	 * 添加用户
	 */
	public int addUser(User user) throws ServiceException;
	/*
	 * 修改用户
	 */
	public int modUser(String uid,String passwd,String groupid,String point,String type) throws ServiceException;

//	public boolean updateCmd();
	/*删除用户，锁定用户
	 * 
	 */
	public int deleteUser(String[] id,String method) throws ServiceException;

	
	public int editProfile(String uid,String oldpasswd,String passwd);

}
